// ProjectClone.cpp : implementation file
//

#include "stdafx.h"
#include "Measure.h"
#include "ProjectClone.h"
#include "afxdialogex.h"


// CProjectClone dialog

IMPLEMENT_DYNAMIC(CProjectClone, CDialogEx)

CProjectClone::CProjectClone(CWnd* pParent /*=NULL*/)
	: CDialogEx(CProjectClone::IDD, pParent)
  , template_project_index_(-1)
  , project_name_(_T("project0"))
  , setas_active_(TRUE)
{

}

CProjectClone::~CProjectClone()
{
}

void CProjectClone::DoDataExchange(CDataExchange* pDX)
{
  CDialogEx::DoDataExchange(pDX);
  DDX_Control(pDX, IDC_TEMPLATE_PROJECTS, wnd_template_projects_);
  DDX_LBIndex(pDX, IDC_TEMPLATE_PROJECTS, template_project_index_);
  DDX_Text(pDX, IDC_PROJECT_NAME, project_name_);
  DDX_Check(pDX, IDC_SETAS_ACTIVE, setas_active_);
}


BEGIN_MESSAGE_MAP(CProjectClone, CDialogEx)
END_MESSAGE_MAP()


// CProjectClone message handlers


BOOL CProjectClone::OnInitDialog()
{
  CDialogEx::OnInitDialog();

  for(int index=0; index<theApp.solution().NumProjects(); ++index) {
    wnd_template_projects_.AddString(theApp.solution().project(index).name.c_str());
  }

  return TRUE;
}
